
PROJECT(MyQtItk)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

IF(NOT VTK_BINARY_DIR)
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
  MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
ENDIF(NOT VTK_DIR)
INCLUDE(${VTK_USE_FILE})
ENDIF(NOT VTK_BINARY_DIR)

FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

FIND_PACKAGE(QT4 REQUIRED)
INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(${CMAKE_HOME_DIRECTORY} ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR})
link_directories(${CMAKE_HOME_DIRECTORY})

SET(test01_MOC_SRCS
  test01.h
)

SET(MyQtItk_CPP 
	main.cpp
	Algorithm.cpp
	myqtitk.cpp
	regidialog.cpp
	registration.cpp	
	ImageNavigationArea.cpp
	InputImageGraphicsView.cpp
	MyDoubleSlider.cpp
	MyParameterClasses.cpp
	OutputImageGraphicsView.cpp
	ReconstructionWidget.cpp
	ReconstructionEngine.cpp
	itkQtUpdater.cpp
	QRegAlgorithmRunner.cpp
	regStatusDlg.cpp
	FileNameParser.cpp
	QFileNameListView.cpp
	QImageShower.cpp
	QReconstructionFileDialog.cpp
	ReconstructionParams.cpp
	ReconstructionStruct.cpp
	SegmentationWidget.cpp
	SegmentationAlgorithms.cpp
	SegmentationDialog.cpp
	RegAlgorithmDialog.cpp
	RegProjectManager.cpp
)

SET(MyQtItk_H
	Algorithm.h
	myqtitk.h
	regidialog.h
	registration.h
	ImageNavigationArea.h
	InputImageGraphicsView.h
	MyParameterClasses.h
	MyDoubleSlider.h
	OutputImageGraphicsView.h
	ReconstructionWidget.h
	ReconstructionEngine.h	
	itkQtUpdater.h
	QRegAlgorithmRunner.h
	regStatusDlg.h
	FileNameParser.h
	QFileNameListView.h
	QImageShower.h
	QReconstructionFileDialog.h
	ReconstructionParams.h
	ReconstructionStruct.h
	SegmentationWidget.h
	SegmentationAlgorithms.h
	SegmentationDialog.h
	RegAlgorithmDialog.h
	RegProjectManager.h
)

QT4_WRAP_CPP(MyQtItk_MOCS myqtitk.h regidialog.h registration.h OutputImageGraphicsView.h MyDoubleSlider.h MyParameterClasses.h InputImageGraphicsView.h ImageNavigationArea.h ReconstructionWidget.h ReconstructionEngine.h QRegAlgorithmRunner.h  itkQtUpdater.h regStatusDlg.h
FileNameParser.h QFileNameListView.h QImageShower.h 
QReconstructionFileDialog.h ReconstructionParams.h ReconstructionStruct.h SegmentationWidget.h SegmentationAlgorithms.h SegmentationDialog.h RegAlgorithmDialog.h RegProjectManager.h)

SET(MyQtItk_RESOURCES MyQtItk.qrc)

QT4_ADD_RESOURCES(MyQtItk_RESOURCES_RCC ${MyQtItk_RESOURCES})

QT4_WRAP_UI(MyQtItk_UIS_H myqtitk.ui regidialog.ui middialog.ui)


ADD_DEFINITIONS(-DQT_DLL)

ADD_DEFINITIONS(-DQT_THREAD_SUPPORT)


#SET(QT_USE_QTMAIN TRUE)
ADD_EXECUTABLE( MyQtItk ${MyQtItk_CPP} ${MyQtItk_H}  ${MyQtItk_MOCS} ${MyQtItk_RESOURCES_RCC})

TARGET_LINK_LIBRARIES(MyQtItk ITKIO ITKNumerics)

TARGET_LINK_LIBRARIES(MyQtItk ${QT_LIBRARIES})

TARGET_LINK_LIBRARIES (MyQtItk itksys)

TARGET_LINK_LIBRARIES( MyQtItk
  QVTK
  vtkRendering
  vtkGraphics
  vtkIO
  vtkCommon
  vtkInfovis
  vtkViews
  vtkVolumeRendering
)
TARGET_LINK_LIBRARIES( MyQtItk
  iconv
  libxml2
)



 